local thbattle__xiaoye_yuejishi = fk.CreateSkill {

  name = "thbattle__xiaoye_yuejishi",

  tags = { Skill.Compulsory, },

}



thbattle__xiaoye_yuejishi:addEffect(fk.EventPhaseStart, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(thbattle__xiaoye_yuejishi.name) and player.phase == Player.Start
  end,
  on_use = function(self, event, target, player, data)
    player:gainAnExtraPhase(Player.Play)
  end,
})
thbattle__xiaoye_yuejishi:addEffect(fk.EventPhaseStart, {
  can_refresh = function(self, event, target, player, data)
    return target == player and player:hasSkill(thbattle__xiaoye_yuejishi.name) and player.phase == Player.Play and
        player:getMark("thbattle__xiaoye_yuejishi-turn") == 0
  end,
  on_refresh = function(self, event, target, player, data)
    local room = player.room
    room:addPlayerMark(player, "@!thbattle__xiaoye_yuejishi-phase")
    room:addPlayerMark(player, "thbattle__xiaoye_yuejishi-turn")
  end
})

return thbattle__xiaoye_yuejishi